﻿@model springProject.Models.PageContent
@{
    ViewBag.Title = "CreatePageContent";
    Layout = "~/Views/Admin/_Layout.cshtml";
}
<h2>
    CreatePageContent</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtdusive.min.js")" type="text/javascript"></script>
<script type="text/javascript" src="/Content/jHtmlArea/scripts/jHtmlArea-0.7.0.min.js"></script>
<link rel="Stylesheet" type="text/css" href="/Content/jHtmlArea/style/jHtmlArea.css" />
<script type="text/javascript" src="/Content/jHtmlArea/scripts/jHtmlArea.ColorPickerMenu-0.7.0.js"></script>
<link rel="Stylesheet" type="text/css" href="/Content/jHtmlArea/style/jHtmlArea.ColorPickerMenu.css" />
<script type="text/javascript" src="/Content/jHtmlArea/scripts/jHtmlArea_Param.js"></script>

<link rel="Stylesheet" type="text/css" href="/Content/CSS/ForCreateFields.css" />

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>PageContent</legend>
        @Html.HiddenFor(model => model.ContentId)
        @Html.HiddenFor(model => model.EditDate)
        <table>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(model => model.Summary)
                </td>
                <td class="editor-field">
                    @Html.EditorFor(model => model.Summary)
                    @Html.ValidationMessageFor(model => model.Summary)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    <label for="FolderId">
                        Folder</label>
                </td>
                <td class="editor-field">
                    <select id="FolderId" class="single-line" name="FolderId" size="1">
                        @{
                            foreach (var item in ViewBag.Folders)
                            {
                                <option value = "@item.FolderId">@item.FolderName </option>  
                            }
                        }
                    </select>
                    @Html.ValidationMessageFor(model => model.FolderId)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(model => model.Description)
                </td>
                <td class="editor-field multi-line" >
                    @Html.TextAreaFor(model => model.Description)
                    @Html.ValidationMessageFor(model => model.Description)
                </td>
            </tr>
            <tr>
                <td class="editor-label">
                    @Html.LabelFor(model => model.KeyWords)
                </td>
                <td class="editor-field  multi-line">
                    @Html.TextAreaFor(model => model.KeyWords)
                    @Html.ValidationMessageFor(model => model.KeyWords)
                </td>
            </tr>
            <tr>
                <td>
                    
                </td>
                <td class="editor-field">
                    @Html.TextAreaFor(model => model.Content)
                    @Html.ValidationMessageFor(model => model.Content)
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}
@Html.ActionLink("Back to List", "Index")
